<!--{hook admin_thread_list_inc_start.htm}-->

<?php if($threadlist) { foreach($threadlist as &$_thread) { ?>
<li class="media thread bg-white" data-href="<?php echo $_thread['url']; ?>" tid="<?php echo $_thread['tid'];?>">
	<?php if($_thread['allowtop']) { ?>
	<input type="checkbox" name="modtid" class="mt-3 mr-2" value="<?php echo $_thread['tid']; ?>" />
	<?php } ?>

	<div class="media-body">
		<div class="media">
			<?php if ($_thread['icon']) { ?>
			<div class="col-lg-2 col-md-3 hidden-sm">
				<a href="<?php echo $_thread['url']; ?>" <?php echo (10==$_thread['type']?'rel="nofollow" target="_blank"':''); ?>>
				<img class="d-block w-100 rounded" src="<?php echo $_thread['icon_text'];?>" title="<?php echo $_thread['subject'];?>" alt="<?php echo $_thread['subject'];?>" />
				</a>
			</div>
			<?php } ?>
			<div class="media-body">

				<!--{hook admin_thread_list_inc_thread_start.htm}-->

				<div class="col-lg-12 subject">

					<!--{hook admin_thread_list_inc_sticky_before.htm}-->
					<?php if($_thread['sticky'] > 0) { ?>
					<span class="mr-2 font-weight-bold badge badge-<?php echo $_thread['sticky_class'];?>">
                            Sticky
                    </span>
					<?php } ?>
					<!--{hook admin_thread_list_inc_sticky_after.htm}-->

					<!--{hook admin_thread_list_inc_closed_before.htm}-->
					<?php if($_thread['closed'] > 0) { ?>
					<span class="mr-2">
                            <i class="icon-lock text-<?php echo 1==$_thread['closed']?'danger':'dark';?>"></i>
                        </span>
					<?php } ?>
					<!--{hook admin_thread_list_inc_closed_after.htm}-->

					<h2 class="break-all font-weight-bold d-inline">
						<!--{hook admin_thread_list_inc_subject_before.htm}-->
						<a href="<?php echo $_thread['url']; ?>" aria-label="<?php echo $_thread['subject'];?>" <?php echo (10==$_thread['type']?'rel="nofollow" target="_blank"':''); ?>><?php echo $_thread['subject'];?></a>
						<!--{hook admin_thread_list_inc_subject_after.htm}-->
					</h2>
				</div>

				<!--{hook admin_thread_list_inc_subject_after.htm}-->

				<?php if($_thread['brief']){?>
				<div class="col-lg-12 text-muted brief mt-2">
					<?php echo $_thread['brief'];?>
				</div>
				<?php }?>

				<!--{hook admin_thread_list_inc_tag_before.htm}-->

				<?php if($_thread['tag']){?>
				<div class="tag hidden-sm col-lg-12 small text-muted mt-3">
					<i class="icon-tags mr-2"></i>
					<?php foreach($_thread['tag_text'] as $key => $_tag) {?>
					<span class="mr-2">
                        <strong class="mb-0">
                            <a class="text-secondary" href="<?php echo url('tag-'.$key);?>">
                                <?php echo $_tag;?>
                            </a>
                        </strong>
                    </span>
					<?php }?>
				</div>
				<?php }?>

				<!--{hook admin_thread_list_inc_brief_after.htm}-->

				<div class="col-lg-12 text-grey mt-2">
					<!--{hook admin_thread_list_inc_avatar_before.htm}-->
					<a href="<?php echo url('user-' . $_thread['uid']);?>" tabindex="-1" class="mr-2">
						<img class="avatar-1" src="<?php echo $_thread['user_avatar_url'];?>">
					</a>
					<!--{hook admin_thread_list_inc_avatar_after.htm}-->

					<span class="username text-grey mr-1 <?php if($_thread['lastuid']) { ?> hidden-sm<?php } ?>" uid="<?php echo $_thread['uid'];?>"><?php echo $_thread['username'];?></span>
					<span class="date text-grey <?php if($_thread['lastuid']) { ?> hidden-sm<?php } ?>"><?php echo $_thread['create_date_fmt'];?></span>
					<!--{hook admin_thread_list_inc_username_after.htm}-->

					<!--{hook admin_thread_list_inc_lastuid_before.htm}-->
					<?php if($_thread['lastuid']) { ?>
					<span>
                        <span class="text-grey mx-1">←</span>
                        <span class="username text-grey mr-1" uid="<?php echo $_thread['lastuid'];?>"><?php echo $_thread['lastusername'];?></span>
                        <span class="text-grey"><?php echo $_thread['last_date_fmt'];?></span>
                    </span>
					<?php } ?>
					<!--{hook admin_thread_list_inc_lastuid_after.htm}-->

					<div class="float-right text-muted small">
						<!--{hook admin_thread_list_inc_update_before.htm}-->
						<?php if( $_thread['allowupdate']) { ?>
						<span data-href="<?php echo url('content-update-' . $_thread['tid'] . '-' . $page, $extra); ?>" class="text-grey update-thread"><i class="icon-edit"></i> <?php echo lang('edit');?></span>
						<?php } ?>
                        <!--{hook admin_thread_list_inc_update_after.htm}-->
					</div>
				</div>

				<!--{hook admin_thread_list_inc_thread_end.htm}-->
			</div>
		</div>
	</div>
</li>
<?php }} else { ?>
<li class="list-group-item">
	<div><?php echo lang('none');?></div>
</li>
<?php } ?>
<!--{hook admin_thread_list_inc_end.htm}-->